"""update file , settings models

Revision ID: fe2ea4b329bb
Revises: 0873f42f9cb5
Create Date: 2025-07-04 15:03:46.205757

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'fe2ea4b329bb'
down_revision: Union[str, None] = '0873f42f9cb5'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    """Upgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('files', sa.Column('version', sa.String(length=32), nullable=True))
    op.add_column('files', sa.Column('backend', sa.Enum('PIPELINE', 'VLM', name='backendtype'), nullable=True))
    op.add_column('settings', sa.Column('backend', sa.Enum('PIPELINE', 'VLM_TRANSFORMERS', 'VLM_SGLANG_ENGINE', 'VLM_SGLANG_CLIENT', name='backendtype'), nullable=True))
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('settings', 'backend')
    op.drop_column('files', 'backend')
    op.drop_column('files', 'version')
    # ### end Alembic commands ###
